package edu.zut.hb.software.train.ReceivablesManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Receivables.dao.ReceivablesDao;
import edu.zut.hb.software.train.Receivables.domin.Receivables;
import edu.zut.hb.software.train.ReceivablesManager.service.ReceivablesManager;

@Service("receivablesManager")
public class ReceivablesManagerImpl extends GenericManagerImpl<Receivables, Long> implements ReceivablesManager {

	
	ReceivablesDao receivablesDao;
	
	@Autowired
	public void setReceivablesDao(ReceivablesDao receivablesDao) {
		this.receivablesDao = receivablesDao;
		this.dao = this.receivablesDao;
	}

	@Override
	public List<Receivables> getAll() {
		List<Receivables> all = this.receivablesDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Receivables> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}